Skip to content

truename: accept a trailing colon after a device name - #310

Closed
stuaxo wants to merge 1 commit into
dosemu2:masterfrom
stuaxo:fix-device-name-trailing-colon
Closed

stuaxo wants to merge 1 commit into
dosemu2:masterfrom
stuaxo:fix-device-name-trailing-colon

Conversation

@stuaxo

@stuaxo stuaxo commented Oct 11, 2026

Copy link
Copy Markdown

DOS accepts "NUL:", "CON:" and similar as device names. fdpp does not recognise them, so truename() rejects them on drives whose redirector declines the name, such as a CD-ROM served by MSCDEX.

Recognise a trailing "NAME:" as a device name. Bare drive specifications such as "C:" are unchanged.

Fixes the Big Red Racing installer, where COPYIT.BAT runs "md ... >nul:" with the CD-ROM as the current drive.

DOS accepts "NUL:", "CON:" and similar as device names. fdpp does
not recognise them, so truename() rejects them on drives whose
redirector declines the name, such as a CD-ROM served by MSCDEX.

Recognise a trailing "NAME:" as a device name. Bare drive
specifications such as "C:" are unchanged.

Fixes the Big Red Racing installer, where COPYIT.BAT runs
"md ... >nul:" with the CD-ROM as the current drive.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@stuaxo

stuaxo commented Oct 11, 2026

Copy link
Copy Markdown
Author

OK this seems to be the better fix for the issues with the big red racing installer - it gets to the end and all the files are copied.

It seems like having devices with a colon (e.g. NUL:) later in the paths wasn't working.

┌─────────┬────────┬───────────┬─────────┬─────────┐
│  Drive  │ Input  │ Unpatched │ Patched │ Changed │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ C:      │ nul:   │ C:/NUL    │ C:/NUL  │ no      │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ C:      │ NUL:   │ C:/NUL    │ C:/NUL  │ no      │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ C:      │ con:   │ C:/CON    │ C:/CON  │ no      │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ C:      │ prn:   │ C:/PRN    │ C:/PRN  │ no      │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ C:      │ aux:   │ C:/AUX    │ C:/AUX  │ no      │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ C:      │ c:nul: │ C:/NUL    │ C:/NUL  │ no      │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ G: (CD) │ nul:   │ E2        │ G:/NUL  │ yes     │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ G: (CD) │ NUL:   │ E2        │ G:/NUL  │ yes     │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ G: (CD) │ con:   │ E2        │ G:/CON  │ yes     │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ G: (CD) │ prn:   │ E2        │ G:/PRN  │ yes     │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ G: (CD) │ aux:   │ E2        │ G:/AUX  │ yes     │
├─────────┼────────┼───────────┼─────────┼─────────┤
│ G: (CD) │ c:nul: │ C:/NUL    │ C:/NUL  │ no      │
└─────────┴────────┴───────────┴─────────┴─────────┘

In general not everything is exactly the same as MSDOS, but works enough - I could probably look at a follow up to bring things in line with what MSDOS returns.

stsp added a commit to dosemu2/dosemu2 that referenced this pull request Oct 12, 2026
@stsp

stsp commented Oct 12, 2026

Copy link
Copy Markdown
Member

I added #311 as a replacement,
and also applied
dosemu2/dosemu2@543bd8a
Please test.

@stsp stsp closed this in 2fcaa48 Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants